package com.logos.socket;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class TCPSend {

    public static void main(String[] args) throws IOException {
        // 创建Socket对象
        Socket socket = new Socket("127.0.0.1",1314);
        // 发送数据
        OutputStream os = socket.getOutputStream();
        os.write("板烧鸡腿堡".getBytes());
        // 关闭资源
        os.close();
        socket.close();
    }
}
